git-annex pull and push
authorJoey Hess <joeyh@joeyh.name>
Tue, 16 May 2023 20:37:30 +0000 (16:37 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 16 May 2023 20:51:07 +0000 (16:51 -0400)
commit5df89d58c7d43b5cd26829cb8c4699e02fc352f3
tree063f40d625e223686e9cf13788990b447f4f9e6d
parentb1c396a695f428fbc8dad79e56e41a704330d9a0
git-annex pull and push

Split out two new commands, git-annex pull and git-annex push. Those plus a
git commit are equivilant to git-annex sync.

In a sense, git-annex sync conflates 3 things, and it would have been
better to have push and pull from the beginning and not sync. Although
note that git-annex sync --content is faster than a pull followed by a
push, because it only has to walk the tree once, look at preferred
content once, etc. So there is some value in git-annex sync in speed, as
well as user convenience.

And it would be hard to split out pull and push from sync, as far as the
implementaton goes. The implementation inside sync was easy, just adjust
SyncOptions so it does the right thing.

Note that the new commands default to syncing content, unless
annex.synccontent is explicitly set to false. I'd like sync to also do
that, but that's a hard transition to make. As a start to that
transition, I added a note to git-annex-sync.mdwn that it may start to
do so in a future version of git-annex. But a real transition would
necessarily involve displaying warnings when sync is used without
--content, and time.

Sponsored-by: Kevin Mueller on Patreon
16 files changed:
CHANGELOG
CmdLine/GitAnnex.hs
Command/Pull.hs [new file with mode: 0644]
Command/Push.hs [new file with mode: 0644]
Command/Sync.hs
Types/GitConfig.hs
doc/git-annex-config.mdwn
doc/git-annex-export.mdwn
doc/git-annex-merge.mdwn
doc/git-annex-pull.mdwn [new file with mode: 0644]
doc/git-annex-push.mdwn [new file with mode: 0644]
doc/git-annex-sync.mdwn
doc/git-annex.mdwn
doc/todo/Having___39__git_annex_sync__39___optionally_add/comment_6_2e0ad0cdb9d813d0fbc514c1642669ca._comment
doc/walkthrough/syncing.mdwn
git-annex.cabal